\(\int (d \cos (a+b x))^n \csc ^3(a+b x) \, dx\) [359]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [F]
   Fricas [F]
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 19, antiderivative size = 49 \[ \int (d \cos (a+b x))^n \csc ^3(a+b x) \, dx=-\frac {(d \cos (a+b x))^{1+n} \operatorname {Hypergeometric2F1}\left (2,\frac {1+n}{2},\frac {3+n}{2},\cos ^2(a+b x)\right )}{b d (1+n)} \]

[Out]

-(d*cos(b*x+a))^(1+n)*hypergeom([2, 1/2+1/2*n],[3/2+1/2*n],cos(b*x+a)^2)/b/d/(1+n)

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {2645, 371} \[ \int (d \cos (a+b x))^n \csc ^3(a+b x) \, dx=-\frac {(d \cos (a+b x))^{n+1} \operatorname {Hypergeometric2F1}\left (2,\frac {n+1}{2},\frac {n+3}{2},\cos ^2(a+b x)\right )}{b d (n+1)} \]

[In]

Int[(d*Cos[a + b*x])^n*Csc[a + b*x]^3,x]

[Out]

-(((d*Cos[a + b*x])^(1 + n)*Hypergeometric2F1[2, (1 + n)/2, (3 + n)/2, Cos[a + b*x]^2])/(b*d*(1 + n)))

Rule 371

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^p*((c*x)^(m + 1)/(c*(m + 1)))*Hyperg
eometric2F1[-p, (m + 1)/n, (m + 1)/n + 1, (-b)*(x^n/a)], x] /; FreeQ[{a, b, c, m, n, p}, x] &&  !IGtQ[p, 0] &&
 (ILtQ[p, 0] || GtQ[a, 0])

Rule 2645

Int[(cos[(e_.) + (f_.)*(x_)]*(a_.))^(m_.)*sin[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> Dist[-(a*f)^(-1), Subst[
Int[x^m*(1 - x^2/a^2)^((n - 1)/2), x], x, a*Cos[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2]
 &&  !(IntegerQ[(m - 1)/2] && GtQ[m, 0] && LeQ[m, n])

Rubi steps \begin{align*} \text {integral}& = -\frac {\text {Subst}\left (\int \frac {x^n}{\left (1-\frac {x^2}{d^2}\right )^2} \, dx,x,d \cos (a+b x)\right )}{b d} \\ & = -\frac {(d \cos (a+b x))^{1+n} \operatorname {Hypergeometric2F1}\left (2,\frac {1+n}{2},\frac {3+n}{2},\cos ^2(a+b x)\right )}{b d (1+n)} \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(154\) vs. \(2(49)=98\).

Time = 0.90 (sec) , antiderivative size = 154, normalized size of antiderivative = 3.14 \[ \int (d \cos (a+b x))^n \csc ^3(a+b x) \, dx=-\frac {2^{-3-n} \cos (a+b x) (d \cos (a+b x))^n \left (2^{1+n} \operatorname {Hypergeometric2F1}(1,1+n,2+n,\cos (a+b x))+2^{1+n} \operatorname {Hypergeometric2F1}(2,1+n,2+n,\cos (a+b x))+\left (\operatorname {Hypergeometric2F1}\left (n,1+n,2+n,\frac {1}{2} \cos (a+b x) \sec ^2\left (\frac {1}{2} (a+b x)\right )\right )+\operatorname {Hypergeometric2F1}\left (1+n,1+n,2+n,\frac {1}{2} \cos (a+b x) \sec ^2\left (\frac {1}{2} (a+b x)\right )\right )\right ) \sec ^2\left (\frac {1}{2} (a+b x)\right )^{1+n}\right )}{b (1+n)} \]

[In]

Integrate[(d*Cos[a + b*x])^n*Csc[a + b*x]^3,x]

[Out]

-((2^(-3 - n)*Cos[a + b*x]*(d*Cos[a + b*x])^n*(2^(1 + n)*Hypergeometric2F1[1, 1 + n, 2 + n, Cos[a + b*x]] + 2^
(1 + n)*Hypergeometric2F1[2, 1 + n, 2 + n, Cos[a + b*x]] + (Hypergeometric2F1[n, 1 + n, 2 + n, (Cos[a + b*x]*S
ec[(a + b*x)/2]^2)/2] + Hypergeometric2F1[1 + n, 1 + n, 2 + n, (Cos[a + b*x]*Sec[(a + b*x)/2]^2)/2])*(Sec[(a +
 b*x)/2]^2)^(1 + n)))/(b*(1 + n)))

Maple [F]

\[\int \left (d \cos \left (b x +a \right )\right )^{n} \left (\csc ^{3}\left (b x +a \right )\right )d x\]

[In]

int((d*cos(b*x+a))^n*csc(b*x+a)^3,x)

[Out]

int((d*cos(b*x+a))^n*csc(b*x+a)^3,x)

Fricas [F]

\[ \int (d \cos (a+b x))^n \csc ^3(a+b x) \, dx=\int { \left (d \cos \left (b x + a\right )\right )^{n} \csc \left (b x + a\right )^{3} \,d x } \]

[In]

integrate((d*cos(b*x+a))^n*csc(b*x+a)^3,x, algorithm="fricas")

[Out]

integral((d*cos(b*x + a))^n*csc(b*x + a)^3, x)

Sympy [F]

\[ \int (d \cos (a+b x))^n \csc ^3(a+b x) \, dx=\int \left (d \cos {\left (a + b x \right )}\right )^{n} \csc ^{3}{\left (a + b x \right )}\, dx \]

[In]

integrate((d*cos(b*x+a))**n*csc(b*x+a)**3,x)

[Out]

Integral((d*cos(a + b*x))**n*csc(a + b*x)**3, x)

Maxima [F]

\[ \int (d \cos (a+b x))^n \csc ^3(a+b x) \, dx=\int { \left (d \cos \left (b x + a\right )\right )^{n} \csc \left (b x + a\right )^{3} \,d x } \]

[In]

integrate((d*cos(b*x+a))^n*csc(b*x+a)^3,x, algorithm="maxima")

[Out]

integrate((d*cos(b*x + a))^n*csc(b*x + a)^3, x)

Giac [F]

\[ \int (d \cos (a+b x))^n \csc ^3(a+b x) \, dx=\int { \left (d \cos \left (b x + a\right )\right )^{n} \csc \left (b x + a\right )^{3} \,d x } \]

[In]

integrate((d*cos(b*x+a))^n*csc(b*x+a)^3,x, algorithm="giac")

[Out]

integrate((d*cos(b*x + a))^n*csc(b*x + a)^3, x)

Mupad [F(-1)]

Timed out. \[ \int (d \cos (a+b x))^n \csc ^3(a+b x) \, dx=\int \frac {{\left (d\,\cos \left (a+b\,x\right )\right )}^n}{{\sin \left (a+b\,x\right )}^3} \,d x \]

[In]

int((d*cos(a + b*x))^n/sin(a + b*x)^3,x)

[Out]

int((d*cos(a + b*x))^n/sin(a + b*x)^3, x)